#! /usr/bin/env perl
# author: maxiao
# date: 2023-03-07 22:28
# description: 测试子程序签名，以改变子程序的定义方式

use v5.20;
use utf8;
use feature qw(signatures);
no warnings qw(experimental::signatures);

sub max($m, $n){
    if ($m > $n){$m}else{$n}
}

my $result = &max(82, 77);
print "$result\n";

&show_max(29, 7, 11, 23);
sub show_max($max, @set){
    foreach ( @set ) {
        if ( $_ > $max ){
            $max = $_;
        }
    }
    print "max--->$max\n";
}
